package hip.util.poi;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;

/**
 * @author qiujl
 * @date 2016-3-2
 * @describe 通用poi导入导出接口服务
 */
public class PoiService {
    /**
     * @throws SQLException
     * @throws IOException
     * @throws FileNotFoundException
     * @describe 导入数据
     * 调用方式如：
     * HxlsRead xls2csv = new HxlsRead("d:/test.xls",0,new SupplierProducsService());
     * xls2csv.process();
     */

    public static String importData(String filename, int sheetIndex, HxlsOptRowsInterface hxlsOptRowsInterface, Object obj) throws Exception {
        HxlsRead xls2csv = new HxlsRead(filename, sheetIndex, hxlsOptRowsInterface, obj);
        xls2csv.process();
        return HxlsMessage.getMessageForImport(xls2csv);
    }
}
